<h2>e-url</h2>
<p>在ejs容器上写e-url，表示从该url获取数据填充。</p>
<p>模板</p>
<pre class="temp"></pre>
<p>代码</p>
<pre class="script"></pre>
<p>输出</p>
<div id="myDiv" ejs ejs-url="example/data.json">
    <table>
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>年龄</th>
        </tr>
        <tr e-for="i in data">
            <td>{{data[i].id}}</td>
            <td>{{data[i].name}}</td>
            <td>{{data[i].age}}</td>
        </tr>
    </table>
</div>
<br>
<br>
<script src="../js/jquery.min.js"></script>
<script src="../js/ejs.min.js"></script>
<script src="../js/jqejs.js"></script>
<script id="myJs">
// 全局自动渲染
$(function() {
    $('[ejs]').each(function() {
        var that = $(this);
        if (that.attr('ejs-url')) {
            $.getJSON(that.attr('ejs-url'), function(json) {
                that.ejs(json);
            });
        }
    });
});
</script>
